<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>访问器的属性的独特用法</title>
</head>
<body>
<script>
  let animal = {
    username: 'Hack',
    get name() {
      return this.username
    }
  }


  let dog = {
    __proto__: animal,
    username: 'Alice'
  }


  /*
  * 子类访问父类的属性其实是访问自己的属性
  *
  * */
  console.log(dog.name)

</script>
</body>
</html>